using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VFSSTUELI
    {
        public DataRow Convert2FSSTUELI(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryFSSTUELI(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["FSSMANDANT"] = " ".PadRight(2 ); 
         dwReturn["FSSART"] = " ".PadRight(20 ); 
         dwReturn["FSSPOS"] = " ".PadRight(0 ); 
         dwReturn["FSSAENZL"] = " ".PadRight(0 ); 
         dwReturn["FSSAENB"] = " ".PadRight(8 ); 
         dwReturn["FSSAEND"] = " ".PadRight(0 ); 
         dwReturn["FSSNEUB"] = " ".PadRight(8 ); 
         dwReturn["FSSNEUD"] = " ".PadRight(0 ); 
         dwReturn["FSSVAR"] = " ".PadRight(2 ); 
         dwReturn["FSSFARBE"] = " ".PadRight(10 ); 
         dwReturn["FSSGROE"] = " ".PadRight(7 ); 
         dwReturn["FSSAUFM"] = " ".PadRight(2 ); 
         dwReturn["FSSVERP"] = " ".PadRight(3 ); 
         dwReturn["FSSKONTR"] = " ".PadRight(1 ); 
         dwReturn["FSSPOSTYP"] = " ".PadRight(1 ); 
         dwReturn["FSSFKUNDNR"] = " ".PadRight(8 ); 
         dwReturn["FSSMATKZ"] = " ".PadRight(1 ); 
         dwReturn["FSSKUNDNR"] = " ".PadRight(8 ); 
         dwReturn["FSSWERK"] = " ".PadRight(3 ); 
         dwReturn["FSSABT"] = " ".PadRight(3 ); 
         dwReturn["FSSMART"] = " ".PadRight(20 ); 
         dwReturn["FSSMVAR"] = " ".PadRight(3 ); 
         dwReturn["FSSMFARBE"] = " ".PadRight(10 ); 
         dwReturn["FSSDESS"] = " ".PadRight(10 ); 
         dwReturn["FSSCOL"] = " ".PadRight(10 ); 
         dwReturn["FSSBESCH"] = " ".PadRight(10 ); 
         dwReturn["FSSMGROE"] = " ".PadRight(7 ); 
         dwReturn["FSSMAUFM"] = " ".PadRight(2 ); 
         dwReturn["FSSMVERP"] = " ".PadRight(3 ); 
         dwReturn["FSSVERBR"] = " ".PadRight(0 ); 
         dwReturn["FSSVBME"] = " ".PadRight(3 ); 
         dwReturn["FSSVBGRP"] = " ".PadRight(1 ); 
         dwReturn["FSSVBFKT"] = " ".PadRight(12 ); 
         dwReturn["FSSVERL"] = " ".PadRight(0 ); 
         dwReturn["FSSVBKZ"] = " ".PadRight(1 ); 
         dwReturn["FSSDKZ"] = " ".PadRight(1 ); 
         dwReturn["FSSPSEUDO"] = " ".PadRight(5 ); 
         dwReturn["FSSLO"] = " ".PadRight(2 ); 
         dwReturn["FSSABRKZ"] = " ".PadRight(1 ); 
         dwReturn["FSSAUFKZ"] = " ".PadRight(1 ); 
         dwReturn["FSSMODKZ"] = " ".PadRight(1 ); 
         dwReturn["FSSZUSCHN"] = " ".PadRight(1 ); 
         dwReturn["FSSTEXT"] = " ".PadRight(3 ); 
         dwReturn["FSSREFMOD"] = " ".PadRight(20 ); 
         dwReturn["FSSRMODPOS"] = " ".PadRight(0 ); 
         dwReturn["FSSREFART"] = " ".PadRight(20 ); 
         dwReturn["FSSRARTPOS"] = " ".PadRight(0 ); 
         dwReturn["FSSSW1"] = " ".PadRight(1 ); 
         dwReturn["FSSSW2"] = " ".PadRight(1 ); 
         dwReturn["FSSSW3"] = " ".PadRight(1 ); 
         dwReturn["FSSSW4"] = " ".PadRight(1 ); 
         dwReturn["FSSSW5"] = " ".PadRight(1 ); 
         dwReturn["FSSTVERBR1"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR2"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR3"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR4"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR5"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR6"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR7"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR8"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR9"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR10"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR11"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR12"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR13"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR14"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR15"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR16"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR17"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR18"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR19"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR20"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR21"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR22"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR23"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR24"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR25"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR26"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR27"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR28"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR29"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR30"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR31"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR32"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR33"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR34"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR35"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR36"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR37"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR38"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR39"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR40"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR41"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR42"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR43"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR44"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR45"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR46"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR47"] = " ".PadRight(0 ); 
         dwReturn["FSSTVERBR48"] = " ".PadRight(0 ); 
         dwReturn["FSSVKNPOS"] = " ".PadRight(0 ); 
         dwReturn["FSSPGLKZ"] = " ".PadRight(1 ); 
         dwReturn["FSSFILLER"] = " ".PadRight(42 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapFSSTUELI(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveFSSTUELI(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryFSSTUELI(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapFSSTUELI(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertFSSTUELI(dwLocal, ITXDBVERSION);
            }
            UpdateFSSTUELI(dwLocal);
        }
        public void InsertFSSTUELI(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO FSSTUELI(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryFSSTUELI(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM FSSTUELI WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM FSSTUELI  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "FSSTUELI";
            Return = Result;
            return Return;
        }
        public void DeleteFSSTUELI(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM FSSTUELI   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateFSSTUELI(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE FSSTUELI SET "
                    +"FSSMANDANT= :FSSMANDANT,"
                    +"FSSART= :FSSART,"
                    +"FSSPOS= :FSSPOS,"
                    +"FSSAENZL= :FSSAENZL,"
                    +"FSSAENB= :FSSAENB,"
                    +"FSSAEND= :FSSAEND,"
                    +"FSSNEUB= :FSSNEUB,"
                    +"FSSNEUD= :FSSNEUD,"
                    +"FSSVAR= :FSSVAR,"
                    +"FSSFARBE= :FSSFARBE,"
                    +"FSSGROE= :FSSGROE,"
                    +"FSSAUFM= :FSSAUFM,"
                    +"FSSVERP= :FSSVERP,"
                    +"FSSKONTR= :FSSKONTR,"
                    +"FSSPOSTYP= :FSSPOSTYP,"
                    +"FSSFKUNDNR= :FSSFKUNDNR,"
                    +"FSSMATKZ= :FSSMATKZ,"
                    +"FSSKUNDNR= :FSSKUNDNR,"
                    +"FSSWERK= :FSSWERK,"
                    +"FSSABT= :FSSABT,"
                    +"FSSMART= :FSSMART,"
                    +"FSSMVAR= :FSSMVAR,"
                    +"FSSMFARBE= :FSSMFARBE,"
                    +"FSSDESS= :FSSDESS,"
                    +"FSSCOL= :FSSCOL,"
                    +"FSSBESCH= :FSSBESCH,"
                    +"FSSMGROE= :FSSMGROE,"
                    +"FSSMAUFM= :FSSMAUFM,"
                    +"FSSMVERP= :FSSMVERP,"
                    +"FSSVERBR= :FSSVERBR,"
                    +"FSSVBME= :FSSVBME,"
                    +"FSSVBGRP= :FSSVBGRP,"
                    +"FSSVBFKT= :FSSVBFKT,"
                    +"FSSVERL= :FSSVERL,"
                    +"FSSVBKZ= :FSSVBKZ,"
                    +"FSSDKZ= :FSSDKZ,"
                    +"FSSPSEUDO= :FSSPSEUDO,"
                    +"FSSLO= :FSSLO,"
                    +"FSSABRKZ= :FSSABRKZ,"
                    +"FSSAUFKZ= :FSSAUFKZ,"
                    +"FSSMODKZ= :FSSMODKZ,"
                    +"FSSZUSCHN= :FSSZUSCHN,"
                    +"FSSTEXT= :FSSTEXT,"
                    +"FSSREFMOD= :FSSREFMOD,"
                    +"FSSRMODPOS= :FSSRMODPOS,"
                    +"FSSREFART= :FSSREFART,"
                    +"FSSRARTPOS= :FSSRARTPOS,"
                    +"FSSSW1= :FSSSW1,"
                    +"FSSSW2= :FSSSW2,"
                    +"FSSSW3= :FSSSW3,"
                    +"FSSSW4= :FSSSW4,"
                    +"FSSSW5= :FSSSW5,"
                    +"FSSTVERBR1= :FSSTVERBR1,"
                    +"FSSTVERBR2= :FSSTVERBR2,"
                    +"FSSTVERBR3= :FSSTVERBR3,"
                    +"FSSTVERBR4= :FSSTVERBR4,"
                    +"FSSTVERBR5= :FSSTVERBR5,"
                    +"FSSTVERBR6= :FSSTVERBR6,"
                    +"FSSTVERBR7= :FSSTVERBR7,"
                    +"FSSTVERBR8= :FSSTVERBR8,"
                    +"FSSTVERBR9= :FSSTVERBR9,"
                    +"FSSTVERBR10= :FSSTVERBR10,"
                    +"FSSTVERBR11= :FSSTVERBR11,"
                    +"FSSTVERBR12= :FSSTVERBR12,"
                    +"FSSTVERBR13= :FSSTVERBR13,"
                    +"FSSTVERBR14= :FSSTVERBR14,"
                    +"FSSTVERBR15= :FSSTVERBR15,"
                    +"FSSTVERBR16= :FSSTVERBR16,"
                    +"FSSTVERBR17= :FSSTVERBR17,"
                    +"FSSTVERBR18= :FSSTVERBR18,"
                    +"FSSTVERBR19= :FSSTVERBR19,"
                    +"FSSTVERBR20= :FSSTVERBR20,"
                    +"FSSTVERBR21= :FSSTVERBR21,"
                    +"FSSTVERBR22= :FSSTVERBR22,"
                    +"FSSTVERBR23= :FSSTVERBR23,"
                    +"FSSTVERBR24= :FSSTVERBR24,"
                    +"FSSTVERBR25= :FSSTVERBR25,"
                    +"FSSTVERBR26= :FSSTVERBR26,"
                    +"FSSTVERBR27= :FSSTVERBR27,"
                    +"FSSTVERBR28= :FSSTVERBR28,"
                    +"FSSTVERBR29= :FSSTVERBR29,"
                    +"FSSTVERBR30= :FSSTVERBR30,"
                    +"FSSTVERBR31= :FSSTVERBR31,"
                    +"FSSTVERBR32= :FSSTVERBR32,"
                    +"FSSTVERBR33= :FSSTVERBR33,"
                    +"FSSTVERBR34= :FSSTVERBR34,"
                    +"FSSTVERBR35= :FSSTVERBR35,"
                    +"FSSTVERBR36= :FSSTVERBR36,"
                    +"FSSTVERBR37= :FSSTVERBR37,"
                    +"FSSTVERBR38= :FSSTVERBR38,"
                    +"FSSTVERBR39= :FSSTVERBR39,"
                    +"FSSTVERBR40= :FSSTVERBR40,"
                    +"FSSTVERBR41= :FSSTVERBR41,"
                    +"FSSTVERBR42= :FSSTVERBR42,"
                    +"FSSTVERBR43= :FSSTVERBR43,"
                    +"FSSTVERBR44= :FSSTVERBR44,"
                    +"FSSTVERBR45= :FSSTVERBR45,"
                    +"FSSTVERBR46= :FSSTVERBR46,"
                    +"FSSTVERBR47= :FSSTVERBR47,"
                    +"FSSTVERBR48= :FSSTVERBR48,"
                    +"FSSVKNPOS= :FSSVKNPOS,"
                    +"FSSPGLKZ= :FSSPGLKZ,"
                    +"FSSFILLER= :FSSFILLER,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("FSSMANDANT", OracleType.NVarChar).Value = dwData["FSSMANDANT"].ToString(); 
          or1.Parameters.Add("FSSART", OracleType.NVarChar).Value = dwData["FSSART"].ToString(); 
          or1.Parameters.Add("FSSPOS", OracleType.NVarChar).Value = dwData["FSSPOS"].ToString(); 
          or1.Parameters.Add("FSSAENZL", OracleType.NVarChar).Value = dwData["FSSAENZL"].ToString(); 
          or1.Parameters.Add("FSSAENB", OracleType.NVarChar).Value = dwData["FSSAENB"].ToString(); 
          or1.Parameters.Add("FSSAEND", OracleType.NVarChar).Value = dwData["FSSAEND"].ToString(); 
          or1.Parameters.Add("FSSNEUB", OracleType.NVarChar).Value = dwData["FSSNEUB"].ToString(); 
          or1.Parameters.Add("FSSNEUD", OracleType.NVarChar).Value = dwData["FSSNEUD"].ToString(); 
          or1.Parameters.Add("FSSVAR", OracleType.NVarChar).Value = dwData["FSSVAR"].ToString(); 
          or1.Parameters.Add("FSSFARBE", OracleType.NVarChar).Value = dwData["FSSFARBE"].ToString(); 
          or1.Parameters.Add("FSSGROE", OracleType.NVarChar).Value = dwData["FSSGROE"].ToString(); 
          or1.Parameters.Add("FSSAUFM", OracleType.NVarChar).Value = dwData["FSSAUFM"].ToString(); 
          or1.Parameters.Add("FSSVERP", OracleType.NVarChar).Value = dwData["FSSVERP"].ToString(); 
          or1.Parameters.Add("FSSKONTR", OracleType.NVarChar).Value = dwData["FSSKONTR"].ToString(); 
          or1.Parameters.Add("FSSPOSTYP", OracleType.NVarChar).Value = dwData["FSSPOSTYP"].ToString(); 
          or1.Parameters.Add("FSSFKUNDNR", OracleType.NVarChar).Value = dwData["FSSFKUNDNR"].ToString(); 
          or1.Parameters.Add("FSSMATKZ", OracleType.NVarChar).Value = dwData["FSSMATKZ"].ToString(); 
          or1.Parameters.Add("FSSKUNDNR", OracleType.NVarChar).Value = dwData["FSSKUNDNR"].ToString(); 
          or1.Parameters.Add("FSSWERK", OracleType.NVarChar).Value = dwData["FSSWERK"].ToString(); 
          or1.Parameters.Add("FSSABT", OracleType.NVarChar).Value = dwData["FSSABT"].ToString(); 
          or1.Parameters.Add("FSSMART", OracleType.NVarChar).Value = dwData["FSSMART"].ToString(); 
          or1.Parameters.Add("FSSMVAR", OracleType.NVarChar).Value = dwData["FSSMVAR"].ToString(); 
          or1.Parameters.Add("FSSMFARBE", OracleType.NVarChar).Value = dwData["FSSMFARBE"].ToString(); 
          or1.Parameters.Add("FSSDESS", OracleType.NVarChar).Value = dwData["FSSDESS"].ToString(); 
          or1.Parameters.Add("FSSCOL", OracleType.NVarChar).Value = dwData["FSSCOL"].ToString(); 
          or1.Parameters.Add("FSSBESCH", OracleType.NVarChar).Value = dwData["FSSBESCH"].ToString(); 
          or1.Parameters.Add("FSSMGROE", OracleType.NVarChar).Value = dwData["FSSMGROE"].ToString(); 
          or1.Parameters.Add("FSSMAUFM", OracleType.NVarChar).Value = dwData["FSSMAUFM"].ToString(); 
          or1.Parameters.Add("FSSMVERP", OracleType.NVarChar).Value = dwData["FSSMVERP"].ToString(); 
          or1.Parameters.Add("FSSVERBR", OracleType.NVarChar).Value = dwData["FSSVERBR"].ToString(); 
          or1.Parameters.Add("FSSVBME", OracleType.NVarChar).Value = dwData["FSSVBME"].ToString(); 
          or1.Parameters.Add("FSSVBGRP", OracleType.NVarChar).Value = dwData["FSSVBGRP"].ToString(); 
          or1.Parameters.Add("FSSVBFKT", OracleType.NVarChar).Value = dwData["FSSVBFKT"].ToString(); 
          or1.Parameters.Add("FSSVERL", OracleType.NVarChar).Value = dwData["FSSVERL"].ToString(); 
          or1.Parameters.Add("FSSVBKZ", OracleType.NVarChar).Value = dwData["FSSVBKZ"].ToString(); 
          or1.Parameters.Add("FSSDKZ", OracleType.NVarChar).Value = dwData["FSSDKZ"].ToString(); 
          or1.Parameters.Add("FSSPSEUDO", OracleType.NVarChar).Value = dwData["FSSPSEUDO"].ToString(); 
          or1.Parameters.Add("FSSLO", OracleType.NVarChar).Value = dwData["FSSLO"].ToString(); 
          or1.Parameters.Add("FSSABRKZ", OracleType.NVarChar).Value = dwData["FSSABRKZ"].ToString(); 
          or1.Parameters.Add("FSSAUFKZ", OracleType.NVarChar).Value = dwData["FSSAUFKZ"].ToString(); 
          or1.Parameters.Add("FSSMODKZ", OracleType.NVarChar).Value = dwData["FSSMODKZ"].ToString(); 
          or1.Parameters.Add("FSSZUSCHN", OracleType.NVarChar).Value = dwData["FSSZUSCHN"].ToString(); 
          or1.Parameters.Add("FSSTEXT", OracleType.NVarChar).Value = dwData["FSSTEXT"].ToString(); 
          or1.Parameters.Add("FSSREFMOD", OracleType.NVarChar).Value = dwData["FSSREFMOD"].ToString(); 
          or1.Parameters.Add("FSSRMODPOS", OracleType.NVarChar).Value = dwData["FSSRMODPOS"].ToString(); 
          or1.Parameters.Add("FSSREFART", OracleType.NVarChar).Value = dwData["FSSREFART"].ToString(); 
          or1.Parameters.Add("FSSRARTPOS", OracleType.NVarChar).Value = dwData["FSSRARTPOS"].ToString(); 
          or1.Parameters.Add("FSSSW1", OracleType.NVarChar).Value = dwData["FSSSW1"].ToString(); 
          or1.Parameters.Add("FSSSW2", OracleType.NVarChar).Value = dwData["FSSSW2"].ToString(); 
          or1.Parameters.Add("FSSSW3", OracleType.NVarChar).Value = dwData["FSSSW3"].ToString(); 
          or1.Parameters.Add("FSSSW4", OracleType.NVarChar).Value = dwData["FSSSW4"].ToString(); 
          or1.Parameters.Add("FSSSW5", OracleType.NVarChar).Value = dwData["FSSSW5"].ToString(); 
          or1.Parameters.Add("FSSTVERBR1", OracleType.NVarChar).Value = dwData["FSSTVERBR1"].ToString(); 
          or1.Parameters.Add("FSSTVERBR2", OracleType.NVarChar).Value = dwData["FSSTVERBR2"].ToString(); 
          or1.Parameters.Add("FSSTVERBR3", OracleType.NVarChar).Value = dwData["FSSTVERBR3"].ToString(); 
          or1.Parameters.Add("FSSTVERBR4", OracleType.NVarChar).Value = dwData["FSSTVERBR4"].ToString(); 
          or1.Parameters.Add("FSSTVERBR5", OracleType.NVarChar).Value = dwData["FSSTVERBR5"].ToString(); 
          or1.Parameters.Add("FSSTVERBR6", OracleType.NVarChar).Value = dwData["FSSTVERBR6"].ToString(); 
          or1.Parameters.Add("FSSTVERBR7", OracleType.NVarChar).Value = dwData["FSSTVERBR7"].ToString(); 
          or1.Parameters.Add("FSSTVERBR8", OracleType.NVarChar).Value = dwData["FSSTVERBR8"].ToString(); 
          or1.Parameters.Add("FSSTVERBR9", OracleType.NVarChar).Value = dwData["FSSTVERBR9"].ToString(); 
          or1.Parameters.Add("FSSTVERBR10", OracleType.NVarChar).Value = dwData["FSSTVERBR10"].ToString(); 
          or1.Parameters.Add("FSSTVERBR11", OracleType.NVarChar).Value = dwData["FSSTVERBR11"].ToString(); 
          or1.Parameters.Add("FSSTVERBR12", OracleType.NVarChar).Value = dwData["FSSTVERBR12"].ToString(); 
          or1.Parameters.Add("FSSTVERBR13", OracleType.NVarChar).Value = dwData["FSSTVERBR13"].ToString(); 
          or1.Parameters.Add("FSSTVERBR14", OracleType.NVarChar).Value = dwData["FSSTVERBR14"].ToString(); 
          or1.Parameters.Add("FSSTVERBR15", OracleType.NVarChar).Value = dwData["FSSTVERBR15"].ToString(); 
          or1.Parameters.Add("FSSTVERBR16", OracleType.NVarChar).Value = dwData["FSSTVERBR16"].ToString(); 
          or1.Parameters.Add("FSSTVERBR17", OracleType.NVarChar).Value = dwData["FSSTVERBR17"].ToString(); 
          or1.Parameters.Add("FSSTVERBR18", OracleType.NVarChar).Value = dwData["FSSTVERBR18"].ToString(); 
          or1.Parameters.Add("FSSTVERBR19", OracleType.NVarChar).Value = dwData["FSSTVERBR19"].ToString(); 
          or1.Parameters.Add("FSSTVERBR20", OracleType.NVarChar).Value = dwData["FSSTVERBR20"].ToString(); 
          or1.Parameters.Add("FSSTVERBR21", OracleType.NVarChar).Value = dwData["FSSTVERBR21"].ToString(); 
          or1.Parameters.Add("FSSTVERBR22", OracleType.NVarChar).Value = dwData["FSSTVERBR22"].ToString(); 
          or1.Parameters.Add("FSSTVERBR23", OracleType.NVarChar).Value = dwData["FSSTVERBR23"].ToString(); 
          or1.Parameters.Add("FSSTVERBR24", OracleType.NVarChar).Value = dwData["FSSTVERBR24"].ToString(); 
          or1.Parameters.Add("FSSTVERBR25", OracleType.NVarChar).Value = dwData["FSSTVERBR25"].ToString(); 
          or1.Parameters.Add("FSSTVERBR26", OracleType.NVarChar).Value = dwData["FSSTVERBR26"].ToString(); 
          or1.Parameters.Add("FSSTVERBR27", OracleType.NVarChar).Value = dwData["FSSTVERBR27"].ToString(); 
          or1.Parameters.Add("FSSTVERBR28", OracleType.NVarChar).Value = dwData["FSSTVERBR28"].ToString(); 
          or1.Parameters.Add("FSSTVERBR29", OracleType.NVarChar).Value = dwData["FSSTVERBR29"].ToString(); 
          or1.Parameters.Add("FSSTVERBR30", OracleType.NVarChar).Value = dwData["FSSTVERBR30"].ToString(); 
          or1.Parameters.Add("FSSTVERBR31", OracleType.NVarChar).Value = dwData["FSSTVERBR31"].ToString(); 
          or1.Parameters.Add("FSSTVERBR32", OracleType.NVarChar).Value = dwData["FSSTVERBR32"].ToString(); 
          or1.Parameters.Add("FSSTVERBR33", OracleType.NVarChar).Value = dwData["FSSTVERBR33"].ToString(); 
          or1.Parameters.Add("FSSTVERBR34", OracleType.NVarChar).Value = dwData["FSSTVERBR34"].ToString(); 
          or1.Parameters.Add("FSSTVERBR35", OracleType.NVarChar).Value = dwData["FSSTVERBR35"].ToString(); 
          or1.Parameters.Add("FSSTVERBR36", OracleType.NVarChar).Value = dwData["FSSTVERBR36"].ToString(); 
          or1.Parameters.Add("FSSTVERBR37", OracleType.NVarChar).Value = dwData["FSSTVERBR37"].ToString(); 
          or1.Parameters.Add("FSSTVERBR38", OracleType.NVarChar).Value = dwData["FSSTVERBR38"].ToString(); 
          or1.Parameters.Add("FSSTVERBR39", OracleType.NVarChar).Value = dwData["FSSTVERBR39"].ToString(); 
          or1.Parameters.Add("FSSTVERBR40", OracleType.NVarChar).Value = dwData["FSSTVERBR40"].ToString(); 
          or1.Parameters.Add("FSSTVERBR41", OracleType.NVarChar).Value = dwData["FSSTVERBR41"].ToString(); 
          or1.Parameters.Add("FSSTVERBR42", OracleType.NVarChar).Value = dwData["FSSTVERBR42"].ToString(); 
          or1.Parameters.Add("FSSTVERBR43", OracleType.NVarChar).Value = dwData["FSSTVERBR43"].ToString(); 
          or1.Parameters.Add("FSSTVERBR44", OracleType.NVarChar).Value = dwData["FSSTVERBR44"].ToString(); 
          or1.Parameters.Add("FSSTVERBR45", OracleType.NVarChar).Value = dwData["FSSTVERBR45"].ToString(); 
          or1.Parameters.Add("FSSTVERBR46", OracleType.NVarChar).Value = dwData["FSSTVERBR46"].ToString(); 
          or1.Parameters.Add("FSSTVERBR47", OracleType.NVarChar).Value = dwData["FSSTVERBR47"].ToString(); 
          or1.Parameters.Add("FSSTVERBR48", OracleType.NVarChar).Value = dwData["FSSTVERBR48"].ToString(); 
          or1.Parameters.Add("FSSVKNPOS", OracleType.NVarChar).Value = dwData["FSSVKNPOS"].ToString(); 
          or1.Parameters.Add("FSSPGLKZ", OracleType.NVarChar).Value = dwData["FSSPGLKZ"].ToString(); 
          or1.Parameters.Add("FSSFILLER", OracleType.NVarChar).Value = dwData["FSSFILLER"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
